import request from "./request";

export default {
    getTableData() {
        return request({ url: "/admin/home/getTableData", method: "get" });
    },
    getCountData() {
        return request({ url: "/admin/home/getCountData", method: "get" });
    },
    getChartData() {
        return request({ url: "/admin/home/getChartData", method: "get" });
    }
};

// 获取销售额趋势数据
export function getSalesTrend(params) {
    return request({
        url: '/admin/home/sales/trend',
        method: 'get',
        data: params
    })
}

// 获取库存分布数据
export function getInventoryDistribution() {
    return request({
        url: '/admin/home/inventory/distribution',
        method: 'get'
    })
}

// 获取商品销量TOP10
export function getTopSales() {
    return request({
        url: '/admin/home/sales/top',
        method: 'get'
    })
}